#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.basic.module.userunionrole.mapper;

import ${package}.common.bean.po.UserUnionRole;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Description: 无法补充
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@Repository
public interface UserUnionRoleMapper {

    /**
     * Description:
     * <根据用户主键移除用户角色>
     * @author wupanhua
     * @date 11:59 2019/8/7
     * @param id 1
     **/
    void removeByUserId(Long id);

    /**
     * Description:
     * <根据用户主键删除数据>
     * @author wupanhua
     * @date 12:00 2019/8/7
     * @param key 1
     **/
    void deleteByUserKey(Long key);

    /**
     * Description:
     * <批量插入数据>
     * @author wupanhua
     * @date 12:00 2019/8/7
     * @param userunionroles 1
     **/
    void batchInsert(List<UserUnionRole> userunionroles);

    /**
     * Description:
     * <根据roleid查询是否有用户是应该角色>
     * @author pig
     * @date 12:01 2019/8/7
     * @param id 1
     * @return int
     **/
    int queryUserUnionRoleByRoleId(Long id);

    /**
     * Description:
     * <根据存有角色链表获取角色关联用户表数据>
     * @author wupanhua
     * @date 12:01 2019/8/7
     * @param keys 1
     * @return java.util.List<UserUnionRole>
     **/
    List<UserUnionRole> queryUserUnionRoleByRoleIdList(List<Long> keys);

    /**
     * Description:
     * <清空用户拥有的角色>
     * @author pig
     * @date 12:02 2019/8/7
     * @param keys 1
     **/
    void removeUserUnionRolesByUserKeys(List<Long> keys);
}
